using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace  RFCard
{
    public class CardFactory
    {
        public static ICard CreateCardFactory(CardType type)
        {
            ICard CardDevice =null;
            if(type == CardType.IC)
            {
                CardDevice = new ICDevice();
            }
            else if(type==CardType.RFID)
            {
                CardDevice = new RfidDevice();
            }
            else if(type == CardType.IDMiddle)
            {
                CardDevice = new IDDeviceM();
            }
            else if(type == CardType.IDNear)
            {
                CardDevice = new IDDeviceN();
            }
            else if(type == CardType.PersonID_JCX)
            {
                CardDevice = new IdentifyJCX();
            }

            return CardDevice;
        }
     
    }
}


